package com.bai.localshop.constant;

/**
 * 系统常量类
 */
public class SystemConstants {
    // 用户角色
    public static final String ROLE_ADMIN = "admin";
    public static final String ROLE_USER = "user";
    
    // 响应状态码
    public static final int SUCCESS = 200;
    public static final int ERROR = 500;
    public static final int UNAUTHORIZED = 401;
    public static final int FORBIDDEN = 403;
    public static final int NOT_FOUND = 404;
    
    // 分页默认值
    public static final int DEFAULT_PAGE_SIZE = 10;
    public static final int DEFAULT_PAGE_NUM = 1;
    
    // JWT相关
    public static final String TOKEN_PREFIX = "Bearer ";
    public static final String TOKEN_HEADER = "Authorization";
    
    // 商品状态（购物车使用）
    public static final int PRODUCT_OFFLINE = 0;//下架
    public static final int PRODUCT_NORMAL = 1;//正常
    public static final int PRODUCT_INSUFFICIENT_STOCK = 2;//库存不足
    public static final int PRODUCT_DELETED = 3;//已删除

    // 优惠券状态
    // 是否上架
    public static final int VOUCHER_OFFLINE = 0;// 下架
    public static final int VOUCHER_ONLINE = 1;// 上架

    // 生命周期状态
    public static final int VOUCHER_STATUS_NOT_STARTED = 0;// 未开始
    public static final int VOUCHER_STATUS_ACTIVE = 1;// 进行中
    public static final int VOUCHER_STATUS_ENDED = 2;// 已结束

    /**
     * 订单状态 1待付款 2待接单 3已接单 4运输中 5已完成 6已取消
     */
    public static final Integer ORDER_PENDING_PAYMENT = 1;
    public static final Integer ORDER_TO_BE_CONFIRMED = 2;
    public static final Integer ORDER_CONFIRMED = 3;
    public static final Integer ORDER_DELIVERY_IN_PROGRESS = 4;
    public static final Integer ORDER_COMPLETED = 5;
    public static final Integer ORDER_CANCELLED = 6;

    // 支付方式
    public static final Integer PAY_METHOD_WECHAT = 1;   // 微信支付
    public static final Integer PAY_METHOD_ALIPAY = 2;   // 支付宝支付

    /**
     * 支付状态 0未支付 1已支付 2已退款
     */
    public static final Integer PAY_STATUS_UNPAID = 0;
    public static final Integer PAY_STATUS_PAID = 1;
    public static final Integer PAY_STATUS_REFUNDED = 2;

    // 地址簿相关
    public static final Integer ADDRESS_DEFAULT_NO = 0;  // 非默认地址
    public static final Integer ADDRESS_DEFAULT_YES = 1; // 默认地址

    // 地址标签
    public static final String ADDRESS_LABEL_HOME = "家";
    public static final String ADDRESS_LABEL_COMPANY = "公司";
    public static final String ADDRESS_LABEL_SCHOOL = "学校";
    public static final String ADDRESS_LABEL_OTHER = "其他";
}